<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:ajax="http://www.apusic.com/jsf/ajax" renderKitId="AJAX"
	xmlns:om="http://www.apusic.com/jsf/misc">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/resource/common.css" />
		<w:script src="/resource/common.js" />
	</w:head>
	<w:page>
		<f:loadBundle basename="com.kingdee.bos.waf.winlet.resources.LocalStrings" var="msgs" />
		<om:useBean value="winlet.botp.EditPullListBean"></om:useBean>
		<w:form>
			<div style="height:570px;">
				<w:iframe id="innerFrame" jsvar="innerFrame"  frameborder="0" style="width: 100%;  height: 100%;" src="#{winlet.botp.EditPullListBean.innerFrameUrl}"></w:iframe>
			</div>
			<div>
				<table>
					<tr>
						<td><w:button id="storeTemp" jsvar="storeTemp" allowReEnter="false"  value="#{msgs['storeTemp']}" onclick="sendSelection()"/></td>
						<td><w:button id="confirm" allowReEnter="false"  value="#{msgs['confirm']}" onclick="sendSelection()"/></td>
						<td><w:button id="cancel" allowReEnter="false"  immediate="true" value="#{msgs['cancel']}" /></td>
					</tr>
				</table>
			</div>
		</w:form>
		<ajax:scripter script="#{winlet.botp.EditPullListBean.outerScript}"></ajax:scripter>
	</w:page>
	<script  language="javascript">
	//<![CDATA[	
	function sendSelection()
	{
		var qForm=document.getElementById('editpullForm');
	        var hd;
	  if (!qForm){
	      qForm=document.createElement("form");
	      var atts={'id':'editpullForm','name':'editpullForm','action':location.href,'method':'post'};
	      KD.setElmAttr(qForm,atts);
	      document.body.appendChild(qForm);
	      hd=document.createElement("input");
	      KD.setElmAttr(hd,{'type':'hidden','id':'gridSet','name':'gridSet'});
	      qForm.appendChild(hd);
	  }
	  if (!hd)
	    hd=document.getElementById('gridSet');
	    var obj = document.getElementById('j_id5:innerFrame').contentWindow ;
	    var items = obj.window.grid.getSelectionModel().selections.items;
	    var select  =new Array(); ;
	    for(var i = 0;i<items.length;i++)
	    {
	        select[i] = items[i].data._serverRowIndex ;
	    }
	    //var select = Ext.util.JSON.encode(obj.window.grid.getSelectionModel().selections.items);
	    hd.value= select.toString();
	    OM.ajax.submit('gridSet',null,null);
	}
    //]]>
	</script>
</f:view>